<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>

	<body>
		<img src="../images/20241108/1.webp" alt="" />
		<a href="http://www.baidu.com" title="aaa">百度</a>
		<script>
			// 1. 获取图片元素
			let imgEle = document.querySelector("img");
			// 2. 修改图片对象的属性   对象.属性 = 值
			imgEle.src = "../images/20241108/2.webp";

			// 3 修改a标签 改成京东
			// 1获取对象
			let aEle = document.querySelector("a");

			// 修改打开方式 target
			aEle.target = "_blank";
		</script>
	</body>
</html>
